/**
 * futures : masterlink.futures.vo.GreekPk.java
 */
package masterlink.futures.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/11/8
 * @version 1.0.0	
 */
@Embeddable
public class GreekPk implements Serializable {

	private static final long serialVersionUID = -3908800023620959403L;
	@Column(name="account")
	private String account;
	@Column(name="BROKER")
	private String broker;
	
	public GreekPk() {
	}
	
	
	/**
	 * @param account
	 * @param broker
	 */
	public GreekPk(String account, String broker) {
		super();
		this.account = account;
		this.broker = broker;
	}


	/**
	 * @return the account
	 */
	public String getAccount() {
		return account;
	}
	/**
	 * @param account the account to set
	 */
	public void setAccount(String account) {
		this.account = account;
	}
	/**
	 * @return the broker
	 */
	public String getBroker() {
		return broker;
	}
	/**
	 * @param broker the broker to set
	 */
	public void setBroker(String broker) {
		this.broker = broker;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("GreekPk [account=");
		builder.append(account);
		builder.append(", broker=");
		builder.append(broker);
		builder.append("]");
		return builder.toString();
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((account == null) ? 0 : account.hashCode());
		result = prime * result + ((broker == null) ? 0 : broker.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof GreekPk))
			return false;
		GreekPk other = (GreekPk) obj;
		if (account == null) {
			if (other.account != null)
				return false;
		} else if (!account.equals(other.account))
			return false;
		if (broker == null) {
			if (other.broker != null)
				return false;
		} else if (!broker.equals(other.broker))
			return false;
		return true;
	}

}
